package fr.upmc.i3s.upmcontact.backend;

import android.app.Activity;
import fr.upmc.i3s.upmcontact.callbacks.IGetDataCallback;
import fr.upmc.i3s.upmcontact.callbacks.IPostDataCallback;
import fr.upmc.i3s.upmcontact.callbacks.ISignInCallback;
import fr.upmc.i3s.upmcontact.callbacks.IUpdateDataCallback;
import fr.upmc.i3s.upmcontact.contents.ChatMessage;
import fr.upmc.i3s.upmcontact.contents.Incident;
import fr.upmc.i3s.upmcontact.contents.LostFoundObject;
import fr.upmc.i3s.upmcontact.contents.User;

public interface BackEndBridge {
	
	// RE-INIT BACK END ////////////////////////////////////
	
	public void reinitBackEnd(Activity context);
	
	public void setCancelForAWhile(boolean value);
	
	
	// CONNECTION //////////////////////////////////////////
	
	public void signup(User user);
	
	public void signin(ISignInCallback callback);
	
	public void signin(User user, ISignInCallback callback);
	
	public void logout();

	public User getCurrentUser();
	
	
	// POST OBJECTS ////////////////////////////////////////
	
	public void postIncident(Incident incident);
	
	public void postIncident(Incident incident, IPostDataCallback callback);

	public void postLostFoundObject(LostFoundObject lostObject);
	
	public void postLostFoundObject(LostFoundObject lostObject, IPostDataCallback callback);
	
	public void postChatMessage(ChatMessage message);
	
	public void postChatMessage(ChatMessage message, IPostDataCallback callback);
	
	
	// GET OBJECTS /////////////////////////////////////////
	
	public void getLostObjects(IGetDataCallback callback);

	public void getFoundObjects(IGetDataCallback callback);

	public void getStudentLifeInfos(IGetDataCallback callback);

	public void getUpmcInfos(IGetDataCallback callback);

	public void getMerchantInfos(IGetDataCallback callback);
	
	public void getChatMessages(IGetDataCallback callback);
	
	
	// UPDATE OBJECTS ///////////////////////////////////////
	
	public void updateLostFoundObject(IUpdateDataCallback callback, LostFoundObject lfo, int status);

}
